<div class="panel panel-default panel-intro">
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div class="bootstrap-table">
                    <div class="commonsearch-table">
                        <form class="form-horizontal form-commonsearch" action="" method="get">
                        <fieldset>
                        <div class="row">
                            {volist name="columnlist" id="vo" key="k"}
                                {if $vo.isshowsearch eq 1}
                                  <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                                      <label for="{$vo.columnenname}" class="control-label col-xs-4">{$vo.columnname}</label>
                                      <div class="col-xs-8">
                                          <input type="text" class="form-control" name="search[{$vo.columnenname}]" value="" placeholder="字段名称" id="s-columnname" data-index="1" />
                                      </div>
                                  </div>
                                {/if}
                            {/volist}

                            <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                                <div class="col-sm-8 col-xs-offset-4 text-center">
                                <input type="hidden" name="search[moduleid]" value="{$moduleid}" />
                                <input type="hidden" name="offset" value="{$offset}" />
                                <input type="hidden" name="limit" value="{$limit}" />
                                <button type="submit" class="btn btn-success">搜索</button>
                                <button type="reset" class="btn btn-default">重置</button>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="fixed-table-toolbar">
                <div class="bs-bars pull-left">
                    <div id="toolbar" class="toolbar" style="position: relative;">
                        <a href="javascript:window.location.reload();" class="btn btn-primary btn-refresh" title="刷新">
                        <i class="fa fa-refresh"></i> </a>
                        <a href="javascript:;" url="column/add?moduleid={$moduleid}" class="btn btn-success btn-add thisaddtabs" title="添加">
                        <i class="fa fa-plus"></i> 添加</a>
                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled" title="编辑">
                          <i class="fa fa-pencil"></i> 编辑</a>
                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled" title="删除">
                          <i class="fa fa-trash"></i> 删除</a>
                        <a href="javascript:;" class="btn btn-danger btn-import" title="导入" id="btn-import-GlaqcJ" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false" initialized="true" style="position: relative; z-index: 1;">
                        <i class="fa fa-upload"></i> 导入</a>
                        <div class="dropdown btn-group ">
                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown">
                              <i class="fa fa-cog"></i> 设置</a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=1"><i class="fa"></i> 设为正常</a></li>
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=2"><i class="fa"></i> 设为隐藏</a></li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="columns columns-right btn-group pull-right">
                    <button class="btn btn-default" type="button" id="toggleview" name="toggleview" aria-label="toggle" title="切换">
                        <i class="glyphicon glyphicon-list-alt icon-list-alt"></i>
                    </button>
                    <div class="keep-open btn-group" title="列">
                        <button type="button" aria-label="columns" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-th icon-th"></i>
                        <span class="caret"></span></button>
                        <ul class="dropdown-menu" role="menu">

                        </ul>
                    </div>

                    <div class="export btn-group">
                        <button class="btn btn-default dropdown-toggle" aria-label="export type" title="导出数据" data-toggle="dropdown" type="button"><i class="glyphicon glyphicon-export icon-share"></i> <span class="caret"></span></button>
                        <ul class="dropdown-menu" role="menu">
                        <li role="menuitem" data-type="json"><a href="javascript:void(0)">JSON</a></li>
                        <li role="menuitem" data-type="xml"><a href="javascript:void(0)">XML</a></li>
                        <li role="menuitem" data-type="csv"><a href="javascript:void(0)">CSV</a></li>
                        <li role="menuitem" data-type="txt"><a href="javascript:void(0)">TXT</a></li>
                        <li role="menuitem" data-type="doc"><a href="javascript:void(0)">MS-Word</a></li>
                        <li role="menuitem" data-type="excel"><a href="javascript:void(0)">MS-Excel</a></li>
                        </ul>
                    </div>
                </div>
                <div class="fixed-table-container">
                    <div class="fixed-table-body">
                    <table id="table" class="table table-striped table-bordered table-hover" data-operate-edit="1" data-operate-del="1" width="100%">
                    <thead>
                        <tr>
                            <th class="bs-checkbox" data-field="0">
                                <div class="th-inner"><input id="chkSelectAll" name="chkSelectAll" type="checkbox" /></div>
                                <div class="fht-cell"></div>
                            </th>
                            {volist name="columnlist" id="vo" key="k"}
                                {if condition="($vo.isshowlist==1) and ($vo.columnenname!='itemid')"}
                                <th data-field="{$vo.columnenname}">
                                    <div class="th-inner">{$vo.columnname}</div>
                                    <div class="fht-cell"></div>
                                </th>
                                {/if}
                            {/volist}

                            <th data-field="operate"><div class="th-inner">操作</div>
                            <div class="fht-cell"></div>
                            </th>
                        </tr>
                    </thead>
                    <tbody data-listidx="0" id="datalist">
                        {volist name="lists" id="vo" key="k"}
                        <tr data-index="{$k}">
                            <td class="bs-checkbox" columnname="itemid">
                            <input data-index="{$k}" name="btSelectItem" type="checkbox" value="{$vo.itemid}" />
                            </td>
                            {volist name="columnlist" id="v" key="kk"}
                                  {if condition="($v.isshowlist==1) and ($v.columnenname!='itemid')"}
                                  <td columnname="{$v.columnenname|ucfirst}">
                                  {switch name=$v.optionform}
                                      {case value="datetime"}<?php echo \fast\Date::human($vo[$v['columnenname']]);?>{/case}
                                      {case value="2"}value2{/case}
                                      {default /}{$vo[$v.columnenname]}
                                  {/switch}
                                  </td>
                                  {/if}
                            {/volist}

                            <td columnname="caozuo">
                                <a href="/admin/column/edit?dialog=1&amp;ids={$vo.itemid}" class="btn btn-xs btn-success btn-editone" title="编辑"><i class="fa fa-pencil"></i></a>
                                <a href="javascript:;" class="btn btn-xs btn-danger btn-delone" title="{$vo.itemid}"><i class="fa fa-trash"></i></a>
                            </td>
                        </tr>
                        {/volist}
                    </tbody>
                    </table>
                    </div>
                </div>
                <div class="fixed-table-footer" style="display: none;">
                    <table><tbody><tr></tr></tbody></table>
                </div>
                <div class="fixed-table-pagination" style="display: block;">
                    <div class="pull-left pagination-detail">
                        <span class="pagination-info">
                        显示第 {$offset+1} 到第 {if $totalpage eq $page}{$total}{else}{$limit*$page}{/if} 条记录，总共 {$total} 条记录</span>
                        
                    </div>
                    <div class="pull-right pagination" >
                        <ul class="pagination">
                            {if $total <= $limit || $offset eq 0 }
                                <li class="page-pre"><a href="#" class="btn-disabled disabled">上一页</a></li>
                            {else}
                                <li class="page-pre"><a href="/{$surl}&offset={$offset-$limit}">上一页</a></li>
                            {/if}
                            {for start="1" end="($totalpage+1)"}
                                <li class="page-number {if $i eq $page}active{/if}">
                                <a href="{$surl}&offset={$limit*($i-1)}">{$i}</a></li>
                            {/for}
                            {if $total <= $limit}
                                <li class="page-next"><a href="/{$surl}&offset={$offset+$limit}">下一页</a></li>
                            {else}
                                <li class="page-next"><a href="#">下一页</a></li>
                            {/if}
                        </ul>
                    </div>
                </div>
                </div>
                </div><div class="clearfix"></div>
                </div>
            </div>

        </div>
    </div>
</div>
<script type="text/javascript">
var pagedata = {
        list: {$lists|json_encode},
        columns:{$columnlist|json_encode}
};
</script>
